package Day07;

import java.util.*;

public class Main {
    public static void main1(String[] args) {
        Scanner in = new Scanner(System.in);
        String str = in.next();
        char[] arr = str.toCharArray();
        int len = 0;
        int l = 0;
        int r = 0;
        String ans = "";
        for(r = 0; r < arr.length; r++){
            if(arr[r] >= '0' && arr[r] <= '9'){
                l = r;
                while(r < arr.length && arr[r] >= '0' && arr[r] <= '9'){
                    r++;
                }
                if(r - l > len){
                    len = r - l;
                    ans = str.substring(l, r);
                }
            }
        }
        System.out.println(ans);
    }

    //岛屿数量DFS
    public static void main2(String[] args) {

    }

    //拼三角(DFS/贪心)
    public static void main3(String[] args) {

    }
}
